From: Manuel Munz Date: Fri, 23 Aug 2013 09:16:26 +0000 (+0200) Subject: fix for iynvalid jsoninfo output X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=5dbcca8d41248dc7ebaea7b86be959f21faa2855;p=feed%2Frouting.git fix for iynvalid jsoninfo output --- diff --git a/olsrd/patches/001-fix-jsoninfo.patch b/olsrd/patches/001-fix-jsoninfo.patch new file mode 100644 index 0000000..627a3e9 --- /dev/null +++ b/olsrd/patches/001-fix-jsoninfo.patch @@ -0,0 +1,16 @@ +--- a/lib/jsoninfo/src/olsrd_jsoninfo.c ++++ b/lib/jsoninfo/src/olsrd_jsoninfo.c +@@ -1283,8 +1283,11 @@ send_info(unsigned int send_what, int the_socket) + abuf_init(&abuf, 32768); + + // only add if outputing JSON +- if (send_what & SIW_ALL) abuf_json_open_array_entry(&abuf); +- ++ if (send_what & SIW_ALL) { ++ abuf_json_open_array_entry(&abuf); ++ entrynumber[0] = 0; ++ currentjsondepth = 0; ++ } + if ((send_what & SIW_LINKS) == SIW_LINKS) ipc_print_links(&abuf); + if ((send_what & SIW_NEIGHBORS) == SIW_NEIGHBORS) ipc_print_neighbors(&abuf); + if ((send_what & SIW_TOPOLOGY) == SIW_TOPOLOGY) ipc_print_topology(&abuf);